= stylesheet_link_tag "#{url_prefix}/jsgantt/jsgantt.css"
= javascript_include_tag "#{url_prefix}/jsgantt/jsgantt.js"

%h2 Rapporti di lavoro

%div{:id => "GanttChartDIV", :class => "gantt"}

%script
  var g = new JSGantt.GanttChart('g',document.getElementById('GanttChartDIV'), 'month');
  g.setShowRes(0); // Show/Hide Responsible (0/1)
  g.setShowDur(1); // Show/Hide Duration (0/1)
  g.setShowComp(0); // Show/Hide % Complete(0/1)
  g.setShowStartDate(0); // Show/Hide Start Date(0/1)
  g.setShowEndDate(0); // Show/Hide End Date(0/1)
  g.setDateInputFormat('dd/mm/yyyy')  // Set format of input dates ('mm/dd/yyyy', 'dd/mm/yyyy', 'yyyy-mm-dd')
  g.setDateDisplayFormat('dd/mm/yyyy') // Set format to display dates ('mm/dd/yyyy', 'dd/mm/yyyy', 'yyyy-mm-dd')
  g.setFormatArr("day", "week", "month") // Set format options (up to 4 : "minute","hour","day","week","month","quarter")
  g.setCaptionType('Resource');  // Set to Show Caption (None,Caption,Resource,Duration,Complete)
  // Parameters (pID, pName, pStart, pEnd, pColor, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption)
  //g.AddTaskItem(new JSGantt.TaskItem(11, 'Truffa Davide', '20/12/2010', '31/12/2010', '775500', '', 0, 'ferie'));
  -##{jsgantt_elenco_rapporti}
  #{jsgantt_elenco_personale}
  g.Draw();
  g.DrawDependencies();

-#%p
  -#= render :text => jsgantt_elenco_rapporti
